<form>
    <div class="row form-group" ng-show="!isAdvanced">
        <div class="col-md-5">
            <input class="form-control" placeholder="ID /Load# /MasterBol#" ng-model="load.keyword" ng-keyup="keyUpSearch($event)" />
        </div>
        <button type="button" class="btn blue" style="float:left;" ng-click="_searchLoads()">Search</button>
    </div>
    <div style="margin:15px 0px 20px 0px;">
        <a ng-click="isAdvanced = !isAdvanced" style="font-weight:600;">
            <span ng-show="!isAdvanced">Advanced</span>
            <span ng-show="isAdvanced">Keyword</span> Search
        </a>
    </div>
    <div ng-if="isAdvanced">
        <div class="row form-group">
            <div class="col-md-3">
                <label>Load ID</label>
                <lt-tags-input placeholder="Enter Load NO" ng-model="load.loadIds" fill="LOAD-" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>
            <div class="col-md-3">
                <label>Load NO</label>
                <lt-tags-input placeholder="Enter Load NO" ng-model="load.loadNos" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>
            <div class="col-md-3">
                <label>Customer</label>
                <multiple-organization-auto-complete name="customer" ng-model="load.customerIds" tag="Customer"></multiple-organization-auto-complete>
            </div>
            <div class="col-md-3">
                <label>Load Type</label>
                <ui-select name="loadTypes" ng-model="load.type">
                    <ui-select-match allow-clear="true">
                        <div ng-bind="$select.selected"></div>
                    </ui-select-match>
                    <ui-select-choices repeat="item in typeList" refresh="getTypeList($select.selected)" refresh-delay="50">
                        <div ng-bind="item"></div>
                    </ui-select-choices>
                </ui-select>
            </div>
        </div>

        <div class="row form-group">
            <div class="col-md-3">
                <label>Order ID</label>
                <input class="form-control" placeholder="Enter Order Id" input-auto-fill="DN-" ng-model="load.orderId" type="text" ng-keyup="keyUpSearch($event)"></input>
            </div>
            <div class="col-md-3">
                <label>MBOL</label>
                <lt-tags-input placeholder="Enter master Bol Nos." ng-model="load.masterBolNos" ng-keyup="keyUpSearch($event)"></lt-tags-input>
            </div>
            <div class="col-md-3">
                <label>Appointment Time From</label>
                <lt-date-time value="load.appointmentTimeFrom"></lt-date-time>
            </div>
            <div class="col-md-3">
                <label>Appointment Time To</label>
                <lt-date-time value="load.appointmentTimeTo"></lt-date-time>
            </div>
        </div>
        <div class="row form-group" >
            <div class="col-md-3" ng-hide="hideProperties && hideProperties.indexOf('status') >-1">
                <label>Status</label>
                <ui-select multiple name="status" ng-model="load.statuses">
                    <ui-select-match>
                        {{$item}}
                    </ui-select-match>
                    <ui-select-choices repeat="item  in statusList| filter: $select.search" refresh="getStatusList($select.search)" refresh-delay="50">
                        {{item}}
                    </ui-select-choices>
                </ui-select>
            </div>
            <div class="col-md-3">
                <label>Carrier</label>
                <multiple-organization-auto-complete name="carrier" ng-model="load.carrierIds" tag="Carrier"></multiple-organization-auto-complete>
            </div>
            <div class="col-md-3">
                <label>Trailer</label>
                <input class="form-control" type="text" ng-model="load.trailer">
            </div>
            <div class="col-md-3">
                <label>Container</label>
                <input class="form-control" type="text" ng-model="load.containerNO">
            </div>
        </div>
        <div class="row form-group">
            <div class="col-md-12" style="text-align: right;">
                <waitting-btn type="button" btn-class="btn blue" ng-click="_searchLoads()" value="'Search'" is-loading="loading"></waitting-btn>
            </div>
        </div>
    </div>
</form>